// 引入 react 依赖
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Text, View, Image, TouchableOpacity, ImageBackground, ScrollView } from 'react-native';

// 引入第三方依赖
import _ from 'lodash';
import pureRender from 'pure-render-decorator';
import { Actions } from 'react-native-router-flux';

// antd 按需加载
import { Button} from '@ant-design/react-native';

// 引入 处理数据 所需文件
import { } from './module.js'

// 引入样式
import Styles from './style.js';

// 引入公用组件
import { BlockBox } from '../../components/index.js'

// 引入工具包
import {   size, ScreenWidth } from '../../util/utils.js'
class AddressItem extends Component {
	static propTypes = {

	}

	constructor(props) {
		super(props)
		this.state = {}
	}

	render() {
		const { data, footer, type } = this.props
		if (type == 'store') {
			return (
				<BlockBox
					style={{
						marginTop: 15,
						marginBottom: 15
					}}
				>
					<View
						style={{
							width: ScreenWidth - 30,
							borderRadius: 6,
							overflow: 'hidden',
							backgroundColor: '#fff',
							zIndex: 0

						}}
					>
						<View
							style={{
								flexDirection: 'row',
								alignItems: 'center',
								paddingTop: 12,
								paddingBottom: 12,
								paddingLeft: 15,
								paddingRight: 15,
								justifyContent: 'space-between',
							}}
						>
							<Text allowFontScaling={false} style={{
								fontSize: 16,
								color: '#61676F'
							}}>title </Text>
							<Text allowFontScaling={false} style={{
								marginLeft: 12,
								fontSize: 14,
								color: '#61676F'
							}}>title</Text>
						</View>
						<View style={{
							marginBottom: 20,
							paddingLeft: 15,
							paddingRight: 15,
							alignItems: 'center',
							flexDirection: 'row',
						}}>
							<Text allowFontScaling={false} style={{ fontSize: 14, color: '#8B8B8D', lineHeight: 16, marginLeft: 5 }}>title</Text>
							<Text allowFontScaling={false} style={{ fontSize: 14, color: '#8B8B8D', lineHeight: 16, marginLeft: 5 }}>title</Text>
						</View>
						{footer ? (
							<View
								style={{
									flexDirection: 'row',
									justifyContent: 'flex-end',
									padding: 15,
									borderTopColor: '#DDDDDD',
									borderTopWidth: .5
								}}
							>
								{footer}
							</View>
						) : null}
					</View>
				</BlockBox>
			)
		} else {
			return (
				<BlockBox
					style={{
						marginTop: 15,
						marginBottom: 15
					}}
				>
					<View
						style={{
							width: ScreenWidth - 30,
							borderRadius: 6,
							overflow: 'hidden',
							backgroundColor: '#fff',
							zIndex: 0

						}}
					>
						<View
							style={{
								flexDirection: 'row',
								alignItems: 'center',
								paddingTop: 12,
								paddingBottom: 12,
								paddingLeft: 15,
								paddingRight: 15,
								justifyContent: 'space-between',
							}}
						>
							<Text allowFontScaling={false} style={{
								fontSize: 16,
								color: '#61676F'
							}}>title</Text>
							<Text allowFontScaling={false} style={{
								marginLeft: 12,
								fontSize: 14,
								color: '#61676F'
							}}>title</Text>
						</View>
						<View style={{
							marginBottom: 20,
							paddingLeft: 15,
							paddingRight: 15,
							alignItems: 'center',
							flexDirection: 'row',
						}}>
							<Button>默认</Button>
							<Text allowFontScaling={false} style={{ fontSize: 14, color: '#8B8B8D', lineHeight: 16, marginLeft: 5 }}>title</Text>
						</View>
						<View
							style={{
								flexDirection: 'row',
								justifyContent: 'flex-end',
								padding: 15,
								borderTopColor: '#DDDDDD',
								borderTopWidth: .5
							}}
						>
							{footer}
						</View>
					</View>
				</BlockBox>
			)
		}
	}
}

export default pureRender(AddressItem)
